/**
 * Decription -Xss2m
 * 栈内存泄漏
 * Date 2017/10/6 16:16
 * authur MangoDai
 **/
public class StackOOM {
    private void dontStop() {
        while (true) {

        }
    }

    public void stackLeakByThread() {
        while (true) {
            new Thread(() -> dontStop()).start();
        }
    }

    public static void main(String[] args) {
        StackOOM stackOOM = new StackOOM();
        stackOOM.stackLeakByThread();
    }
}
